Skip to content

Conversation

@SarahIsWeird
Copy link
Contributor

@SarahIsWeird SarahIsWeird commented Feb 3, 2025

Adds the functionality from #181.

Here's my test script, feel free to try to break it some more :)
export default () => {
    const foo = {
        a() {
            this.b = 1
        }
    };

    class MyClass {
        field = {
            a() {
                this.b = 1
            }
        }

        foo() {
            return {
                a() {
                    this.b = 1
                }
            }
        }
    }

    const iTakeAnObjectArgument = ({ a }) => {
        a()
    }

    iTakeAnObjectArgument({
        a() {
            this.b = 1
        }
    })

    let hello = {
        a() {
            this.b = 1
        }
    }

    const bye = hello
    hello = ':('

    return {
        foo,
        bar: {
            a() {
                this.b = 1
            }
        },
        baz: () => ({
            a() {
                this.b = 1
            }
        }),
        thingy: (() => ({
            a() {
                this.b = 1
            }
        }))(),
        whatever: function () {
            return {
                a() {
                    this.b = 1
                }
            }
        },
        MyClass,
        hello,
        bye,
    };
};

@samualtnorman samualtnorman merged commit ae53eb7 into samualtnorman:main Feb 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants